package com.lft.juc01.base;

import java.util.concurrent.TimeUnit;

/**
 * Function: 		A {@code TestProgress} object With Some FUNCTION.<br/>
 * Reason:   		ADD REASON.<br/>
 * Date:            2021-01-28 17:55<br/>
 * <p>
 * Class Name:      TestProgress<br/>
 * Package Name:    com.lft.juc01.base<br/>
 * @author Laifengting / E-mail:laifengting@foxmail.com
 * @version 1.0.0
 * @since JDK 8
 */
public class TestProcessors {
	public static void main(String[] args) {
		// 获取CPU的核数
		// CPU 密集型，IO 密集型。
		System.out.println(Runtime.getRuntime().availableProcessors());
		
		// 睡一天
		try {
			TimeUnit.DAYS.sleep(1);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		// 睡2秒
		try {
			TimeUnit.SECONDS.sleep(2);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
